#pragma once

#include <vector>
#include "GameObject.h"
#include "Light.h"
#include "Camera.h"
#include "MeshObject.h"

class Scene {
public:
	typedef std::vector<MeshObject*> MeshObjectList;
	typedef std::vector<Light*> LightsList;
	typedef std::vector<Camera*> CamerasList;
private:
	MeshObjectList m_Meshes;
	LightsList m_Lights;
	CamerasList m_Cameras;
	unsigned int m_ActiveCameraIndex;

	bool m_IsLoaded;
public:
	Scene() : m_IsLoaded(false) {}
	~Scene() {
		// TODO: free/unload
	}

	inline bool IsLoaded() const { return m_IsLoaded; }

	void Load() {
		// example scene creation
		m_IsLoaded = true;
	}

	void Unload() {
		// unload loaded objects
		m_IsLoaded = false;
	}

	MeshObjectList& getMeshes() {
		return m_Meshes;
	}

	LightsList& getLights() {
		return m_Lights;
	}

	CamerasList& getCameras() {
		return m_Cameras;
	}

	Camera& getCamera() {
		return *(m_Cameras[m_ActiveCameraIndex]);
	}

};